package com.cragon;

import java.net.URISyntaxException;
import java.security.CodeSource;
import java.security.ProtectionDomain;

/**
 * @Description: TODO
 * @Author: ZHOUHAILONG
 * @Date: 2020年09月16日 14:32
 */
public class CodeTest {
    public static void main(String[] args) throws URISyntaxException {
        CodeTest codeTest = new CodeTest();
        ProtectionDomain protectionDomain = codeTest.getClass().getProtectionDomain();
        CodeSource codeSource = protectionDomain.getCodeSource();
        System.out.println(codeSource.getLocation().toURI().getSchemeSpecificPart());

    }
}
